//
//  DataManager.h
//  CarService
//
//  Created by Nimo.Yu on 15/1/31.
//  Copyright (c) 2015年 lexingsoft. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>

static NSString *KeyUserId = @"userId";
static NSString *KeyUserPassWord = @"userPassWord";
static NSString *KeyTestHost = @"KeyTestHost";
static NSString *KeySubscribeActivity = @"KeySubscribeActivity";
static NSString *KeyUserType = @"KeyUserType";
static NSString *KeyNickName = @"KeyNickName";
static NSString *KeyProxy = @"KeyProxy";
static NSString *KeyWorkId = @"KeyWorkId";
static NSString *KeyReservation = @"KeyReservation";
static NSString *KeyWatermarkOne=@"KeyWatermarkOne";
static NSString *KeyWatermarkTwo=@"KeyWatermarkTwo";
static NSString *KeyWatermarkThree=@"KeyWatermarkThree";
static NSString *KeyServicePhone=@"KeyServicePhone";
static NSString *KeyUsersId=@"KeyUsersId";

/// 全局的数据管理类
@interface DataManager : NSObject
///缓存的用户信息信息
@property (nonatomic, strong) NSDictionary *userInfoDic;
@property (nonatomic, strong) NSString *userToken;
@property (nonatomic, strong) NSString *userId;
@property (nonatomic, strong) NSString *userPassword;
@property (nonatomic, strong) NSString *nickName;
@property (nonatomic, strong) NSString *userName;
@property (nonatomic, strong) NSString *proxy;
@property (nonatomic, strong) NSString *userType;
@property (nonatomic, strong) NSString *isReservation;
@property (nonatomic, strong) NSString *tempUserId;
@property (nonatomic, strong) NSString *tempPassword;
@property (nonatomic, strong) NSString *workId;
@property (nonatomic, strong) NSString *usersId;
@property (nonatomic, strong) NSString *testAcount;
@property (nonatomic, strong) NSString *testAcountCode;
@property (nonatomic, strong) NSString *servicePhone;

@property (nonatomic, strong) NSString *userSequenceNBR;

///第一行水印
@property (nonatomic, strong) NSString *watermarkOne;
///第二行水印
@property (nonatomic, strong) NSString *watermarkTwo;
///第三行水印
@property (nonatomic, strong) NSString *watermarkThree;

///累计签到次数
@property (nonatomic, assign) NSUInteger singinCount;
///今天是否已经签到
@property (nonatomic, assign) BOOL isSinginToday;

@property (nonatomic, strong) NSDictionary *apnsMessage;
@property (nonatomic, assign) BOOL isSubscribeActivityPushMessage;
@property (nonatomic, assign) BOOL isHasNewMessage;
@property (nonatomic, assign) BOOL isHasNewDirectMessage;
@property (nonatomic, strong) NSString *testHost;
@property (nonatomic, strong) NSString *qaHost;
///地理位置
@property (nonatomic, strong) CLLocation *location;
///定位城市名字
@property (nonatomic, strong) NSString *locationName;
///选择的城市名字
@property (nonatomic, strong) NSString *selectedCityName;
///地区编码(陕西省西安市碑林区:610103)
@property (nonatomic, strong) NSString *adcode;

@property (strong, nonatomic) NSMutableDictionary *spaceTokenDic;

/// 获取使用实例
+ (instancetype )sharedInstance;

/// 初始化Manager
- (void) initManager;

/// 清空用户
- (void) clearUserDefaults;

///保存用户信息
- (void) saveUserInfo;

///设置用户信息
- (void) setUserInfoWithDic:(NSDictionary *)userInfo;


///是否登录
- (BOOL) isLogin;

- (void)setTestHost:(NSString *)testHost;
///设置是否订阅活动
- (void)setIsSubscribeActivityPushMessage:(BOOL)isSubscribeActivityPushMessage;

#pragma mark - Tools Function

/// 沙盒路径
+ (NSString *)getDocumentPath;
/// 获取目录
+ (NSString *)getDocumentWithName:(NSString *)name;
@end
